package com.fduss.artStore.service.impl;

import com.fduss.artStore.dao.GalleryDao;
import com.fduss.artStore.dao.impl.GalleryDaoImpl;
import com.fduss.artStore.entity.Gallery;
import com.fduss.artStore.service.GalleryService;

import java.util.List;

/**
 * Created by alex on 29/06/2017.
 */
public class GalleryServiceImpl implements GalleryService {
    private GalleryDao galleryDao;

    public GalleryServiceImpl() {
        galleryDao = new GalleryDaoImpl();
    }

    @Override
    public Gallery add(Gallery gallery) {
        return galleryDao.add(gallery);
    }

    @Override
    public void delete(int galleryId) {
        galleryDao.delete(galleryId);
    }

    @Override
    public Gallery update(Gallery gallery) {
        return galleryDao.update(gallery);
    }

    @Override
    public Gallery getOne(int galleryID) {
        return galleryDao.getOne(galleryID);
    }

    @Override
    public List<Gallery> getAll() {
        return galleryDao.getAll();
    }
}
